-
Notifications
You must be signed in to change notification settings - Fork 42
Centralizes environment variable access by routing variables reads through the envs.py module #1147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
4df238b to
2c92d5d
Compare
|
@kyuyeunk It's ready for review. |
examples/offline_inference.py
Outdated
| if __name__ == "__main__": | ||
| # Skip long warmup for local simple test. | ||
| os.environ['SKIP_JAX_PRECOMPILE'] = '1' | ||
| envs.environment_variables['SKIP_JAX_PRECOMPILE'] = lambda: True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems unintuitive way to specify environment variable within unit tests.
does something like envs.SKIP_JAX_PRECOMPILE = True not work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no setattr to write the variable. Actually the best to rewrite is setting the environ direcly. I have reverted the changes along with other similar changes.
| from vllm.v1.executor.ray_executor import RayWorkerMetaData | ||
| from vllm.v1.executor.ray_utils import RayWorkerWrapper, _wait_until_pg_ready | ||
|
|
||
| import tpu_inference.envs as tpu_envs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other files just use envs for tpu_inference.envs and reword vllm.envs as vllm_envs. what is the rationale for doing it differently here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a mistake, and actually I reverted the file change since it's var setting instead of reading.
Signed-off-by: Xing Liu <xingliu14@gmail.com>
Signed-off-by: Xing Liu <xingliu14@gmail.com>
Signed-off-by: Xing Liu <xingliu14@gmail.com>
Signed-off-by: Xing Liu <xingliu14@gmail.com>
Signed-off-by: Xing Liu <xingliu14@gmail.com>
Signed-off-by: Xing Liu <xingliu14@gmail.com>
Description
Centralizes environment variable access by routing following environment variable reads through the
envs.pymodule.Addressing #1016.
Tests
pytest
Checklist
Before submitting this PR, please make sure: